<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
<div id="app">
        
    <span>
        <button @click="y--" :disabled="y==0">-</button>
        <span> {{y}} </span>
        <button @click="y++" :disabled="y==10">+</button>
    </span>
        <button @click="num++">+</button>
        <button @click="x++">+</button>
        <div v-if = "num>=10">水灵灵</div>
        <div v-if="x%2===0">显示</div>
    
        

</div>
    <script src="./vue.js"></script>
    <script>
        const {createApp,ref} = Vue
       const app = createApp({
            setup(){
                let num=ref(0)
                let x=ref(0)
                let y=ref(0)
                      function add(){
                        num,
                        x,
                        y
                      } 

                return{
                    num,
                    x,
                    y

                }
            }
        
        }).mount('#app')
    </script>
</body>
</html>